#file：文件路径
#index：表格索引；m0：起始行坐标；m：行坐标；n：列坐标；n0：起始列坐标
import xlrd

def read(file = 'original_data.xlsx', sheet_index=0, m0=0, m=999, n0=1, n=999):
    datafile = xlrd.open_workbook(file)
    sheet = datafile.sheet_by_index(sheet_index)
    if m == 999:
        m = sheet.nrows
    if n == 999:
        n = sheet.ncols
    data = []
    for i in range(m0,m):
        for j in range(n0,n):
            data.append(sheet.row_values(i)[j])
        #data.append(sheet.row_values(i)[j] for j in range(n0,n))
    return data

if __name__ == '__main__':
    file = 'original_data.xlsx'
    print(read(sheet_index=0, m0=0, m=1)[0])
    #print(read(file))
